#pragma once

class Bollinger
{
public:
	Bollinger()
		:mid(0),spread(0),upper(0),lower(0)
	{

	}
	Bollinger(double upper, double lower)
		:mid((upper+lower)/2),spread((upper-lower)/2),upper(upper),lower(lower)
	{

	}
	bool operator==(Bollinger const& other) const
	{
		return DoubleEqual(other.lower,lower) && DoubleEqual(other.upper, upper);
	}
	bool operator!=(Bollinger const& other) const
	{
		return !operator==(other);
	}
	double GetMid() const { return mid; }
	double GetSpread() const {return spread;}
	double GetUpper() const { return upper; }
	double GetLower() const { return lower; }
private:
	double mid;
	double spread;
	double upper;
	double lower;
};

